// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.supporter-status {
  @animation-rate: 937.5ms; // 64bpm (aka 128bpm at half-time)
  color: white;

  @keyframes support-fill-pour {
    0% {
      width: 0;
    }
  }

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-direction: row;

  @media @mobile {
    flex-direction: column-reverse;
    align-items: center;
    background: @osu-colour-b5;
  }

  &__flex-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 30px;
    flex-grow: 1;
    margin-left: 30px;

    @media @mobile {
      flex-direction: column;
      align-items: center;
      margin-right: 30px;
    }
  }

  &__flex-container-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 30px;
  }

  &__pippi {
    .at2x-simple("~@images/layout/supporter/header-pippi.png");
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    height: 348px;
    width: 375px;
    flex: none;
    max-width: 100%;
  }

  &__progress-bar {
    width: 100%;
    height: 25px;
    margin-bottom: 10px;
    border-radius: 25px;
    background: hsla(var(--hsl-b6), 0.8);
    opacity: 0.5;
    overflow: hidden;
    .own-layer();

    &--active {
      opacity: 1;
    }
  }

  &__progress-bar-fill {
    height: 100%;
    background-color: @osu-colour-pink-1;
    background-size: 40px 40px;
    border-radius: 25px;
    opacity: 0;

    &--active {
      opacity: 1;
      animation: support-fill-pour @animation-rate ease-in-out;
    }
  }

  &__text {
    font-size: @font-size--title-small;
    &--first {
      margin-bottom: 10px;
    }
  }
}
